part of '../shelf.dart';

/// 自动处理错误，并获取body
final Pipeline pipelineGeneral =
    Pipeline().addMiddleware(errorHandle).addMiddleware(getBody);

/// 确保用户登录
final Pipeline pipelineLogin = pipelineGeneral.addMiddleware(redeemToken);

/// 确保用户为管理员
final Pipeline pipelineAdmin = pipelineLogin.addMiddleware(checkAdmin);
